<template>
    <div class="container">
        <el-table height=350px class="el-table1" align="center" :data="commentlist" stripe style="width: 80%">
            <el-table-column prop="replyDetails.acName" label="谁回复我" width="300">

            </el-table-column>
            <el-table-column prop="content" label="回复内容" width="700">
            </el-table-column>

        </el-table>

        <el-table height=350px class="el-table2" align="center" :data="likelist" stripe style="width: 80%">
            <el-table-column prop="userDetails.acName" label="谁赞了我" width="300">
            </el-table-column>
            <!-- <el-table-column  label="" width="300">
            </el-table-column> -->
            <el-table-column prop="blog.blogName" label="博客名称" width="700">
            </el-table-column>



        </el-table>
    </div>
</template>

<script>

import axios from "axios";

export default {
    data() {
        return {
            // replylist:[],
            commentlist: [],
            likelist: []
        }
    },
    created() {
        axios({
            url: "/api/comment/getReply",
            method: 'post',
            headers: {
                'HOSHINO_T_KK': localStorage.getItem("userToken"),
            },
            data: {

            }

        })
            .then(response => {
                console.log(response.data);
                this.commentlist = response.data.data;
                // this.commentlist = Array.isArray(response.data.data) ? response.data.data : [];
                // this.replylist = response.data.data.replyDetails
            })
            .catch(error => {
                console.error('Error ', error);
            }),
            axios({
                url: "/api/blogLike/getWhoLikeMe",
                method: 'post',
                headers: {
                    "HOSHINO_T_KK": localStorage.getItem("userToken"),
                },

            })
                .then(response => {
                    console.log(response.data);
                    console.log(response.data.data);

                    this.likelist = response.data.data.dataList;
                })
                .catch(error => {
                    console.error('Error ', error);
                })
    },



}
</script>

<style scoped>
.el-table1 {
    position: relative;
    top: 1%;


    margin-left: 10%;
}

.el-table2 {
    margin-left: 10%;
    margin-top: 1%;

}

.container {
    position: relative;
    background-color: white;
    height: 100%;
    width: 90%;

}
</style>
